package com.fox.stock.pojo.entity;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 权限表（菜单）
 * @TableName sys_permission
 */
@ApiModel(description = "权限表（菜单）")
@Data
public class SysPermission implements Serializable {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "主键",example = "1")
    private Long id;

    /**
     * 菜单权限编码(前端按钮权限标识)
     */
    @ApiModelProperty(value = "菜单权限编码(前端按钮权限标识)")
    private String code;

    /**
     * 菜单权限名称
     */
    @ApiModelProperty(value = "菜单权限名称")
    private String title;

    /**
     * 菜单图标(侧边导航栏图标)
     */
    @ApiModelProperty(value = "菜单图标(侧边导航栏图标)")
    private String icon;

    /**
     * SpringSecurity授权标识(如：sys:user:add)
     */
    @ApiModelProperty(value = "SpringSecurity授权标识(如：sys:user:add)")
    private String perms;

    /**
     * 访问地址URL
     */
    @ApiModelProperty(value = "访问地址URL")
    private String url;

    /**
     * 资源请求类型
     */
    @ApiModelProperty(value = "资源请求类型")
    private String method;

    /**
     * name与前端vue路由name约定一致
     */
    @ApiModelProperty(value = "name与前端vue路由name约定一致")
    private String name;

    /**
     * 父级菜单权限id，pid等于0 为顶层权限
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "父级菜单权限id，pid等于0 为顶层权限")
    private Long pid;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer orderNum;

    /**
     * 菜单权限类型(1:目录;2:菜单;3:按钮)
     */
    @ApiModelProperty(value = "菜单权限类型(1:目录;2:菜单;3:按钮)")
    private Integer type;

    /**
     * 状态1:正常 0：禁用
     */
    @ApiModelProperty(value = "状态1:正常 0：禁用")
    private Integer status;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**
     * 是否删除(1未删除；0已删除)
     */
    @ApiModelProperty(value = "是否删除(1未删除；0已删除)")
    private Integer deleted;


    private static final long serialVersionUID = 1L;
}